{extend name="public/base" /}
{block name="css"}
<script src="__INDEX__/js/echarts.min.js"></script>
<script src="__INDEX__/js/plugins/layer/laydate/laydate.js"></script>
{/block}
{block name="container"}
<style>
#dai_box{box-sizing: border-box;background: #ccc;border-radius: 8px;margin: 0 2%}
.daiHeader{width: 100%;display: flex;flex-grow: row wrap;}
.daiTitle{font-size: 18px;padding:8px;width: 50%;text-align: center;margin-bottom: 10px;box-sizing: border-box;}
.dai_num{width: 50%;display: flex;flex-flow: row wrap;justify-content: center;}
.dai_num li{list-style: none;text-decoration: none;margin:16px 10px ;width: 12px;height: 12px;box-sizing: border-box;border-radius: 50%;background: #f1f1f1;}
.onActive{color: #EA2000 !important;border-bottom: 1px solid #000;}
.kuaiHeader{display: flex;flex-flow: row wrap;}
.kuai_more{width: 50%;justify-content: center;display: flex;}
.kuai_more li{box-sizing: border-box;border-radius: 50%;width: 12px;height: 12px;background: #bbb;list-style: none;margin:16px 8px;}
.dActive{background: lime !important ;}
.row_box{width: 100%;height: 100%;margin:50px 0; }
.row_box tr{width: 100%}
.row_box table{width: 100%;height: 100%;}
.row_box tr th{text-align: center;box-sizing: border-box;border:1px solid #ccc;height: 200%;line-height: 200%;font-size: 14px;padding: 1px;color: #433e3e;}
.row_box tr td{text-align: center;box-sizing: border-box;border:1px solid #ccc;height: 200%;line-height: 200%;font-size: 14px;padding:1px;color: #333;}
.row_box tr:nth-child(odd){}
.row_box tr:nth-child(even){background:#dfdcdc;}
.titles{width: 100%;text-align: center;font-size: 18px;color: #000;}
#zongji{background:#2caf8b !important;}
#zongji>td{color:#fff;}
</style>

<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <div class="row">
            <div class="col-sm-12">
                <div class="row">
                    <div class="col-sm-5" id="dai_box">
                        <div class="daiHeader">
                            <div class="daiTitle onActive" style="cursor: pointer;">定制待办事项</div>
                            <div class="daiTitle" style="cursor: pointer;">成衣待办事项</div>
                        </div>
                        <div class="daiCont">
                            <div class="row row-sm text-center " id="dai_cont">
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item lazur-bg">
                                        <div class="h3 text-fff font-thin h3">{$allcount}</div>
                                        <span class="text-muted text-xs">全部订单</span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item yellow-bg">
                                        <div class="h3 text-fff font-thin h3">{$caicount}</div>
                                        <span class="text-muted text-xs">待财审订单</span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item red-bg">
                                        <div class="h3 text-fff font-thin h3">{$bocount}</div>
                                        <span class="text-muted text-xs">已驳回订单</span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item">
                                        <div class="h3 text-info font-thin h3">{$shencount}</div>
                                        <a href=""><span class="text-muted text-xs">待审核订单</span></a> 
                                        <div class="bottom text-left">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item bg-primary">
                                        <div class="h3 text-fff font-thin h3">{$lurucount}</div>
                                        <span class="text-muted text-xs">待定版订单 </span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item  bg-info">
                                        <div class="h3 text-fff font-thin h3">{$xiacount}</div>
                                        <span class="text-muted text-xs">待下载订单</span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                            </div>
                            
                            <div class="row row-sm text-center" id="dai_cont" style="display: none;">
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item lazur-bg">
                                        <div class="h3 text-fff font-thin h3">{$clothescount}</div>
                                        <span class="text-muted text-xs">全部订单</span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item yellow-bg">
                                        <div class="h3 text-fff font-thin h3">{$caiwucount}</div>
                                        <span class="text-muted text-xs">待财审订单</span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item red-bg">
                                        <div class="h3 text-fff font-thin h3">{$rejectcount}</div>
                                        <span class="text-muted text-xs">已驳回订单</span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item">
                                        <div class="h3 text-info font-thin h3">{$chengcount}</div>
                                        <a href=""><span class="text-muted text-xs">待上传版式订单</span></a> 
                                        <div class="bottom text-left">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item bg-primary">
                                        <div class="h3 text-fff font-thin h3">{$uploadcount}</div>
                                        <span class="text-muted text-xs">待下载订单 </span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-4">
                                    <div class="panel padder-v item  bg-info">
                                        <div class="h3 text-fff font-thin h3">{$downloadCount}</div>
                                        <span class="text-muted text-xs">待生成条码订单</span>
                                        <div class="top text-right w-full">

                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-sm-6" id="dai_box">
                        <div class="kuaiHeader">
                            <div class="daiTitle" >快捷方式</div>
                            <div class="kuai_more">
                               <!-- <li class="dActive"></li>
                                   <li></li> -->
                               </div>
                           </div>
                           <div class="kuai_cont">
                            <div class="row row-sm text-center" id="kuai_box">
                                <div class="col-xs-6 col-xm-4 col-md-3">
                                    <a href="{:url('index/order/index',array('status'=>'all'))}">
                                        <div class="panel padder-v item yellow-bg">
                                            <div class="h3 text-info font-thin h3"><span class="fa fa-bar-chart" style="color: #fff"></span></div>
                                            <span class="text-muted text-xs">定制订单管理</span>
                                            <div class="top text-right w-full">
                                            </div>
                                        </div>
                                    </a>
                                </div>
                                <div class="col-xs-6 col-xm-4 col-md-3">
                                    <a href="{:url('index/order/create')}">
                                        <div class="panel padder-v item bg-info">
                                            <div class="h3 text-fff font-thin h3">
                                                <span class="fa fa-edit"></span></div>
                                                <span class="text-muted text-xs">录入定制订单</span>
                                                <div class="top text-right w-full">
                                                </div>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col-xs-6 col-xm-4 col-md-3">
                                        <a href="{:url('index/customer/index')}">
                                            <div class="panel padder-v item bg-primary">
                                                <div class="h3 text-fff font-thin h3"><span class="fa fa-file-text"></span></div>
                                                <span class="text-muted text-xs">客户管理</span>
                                                <div class="top text-right w-full">

                                                </div>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col-xs-6 col-xm-4 col-md-3">
                                        <a href="{:url('index/administration/addClothes')}">
                                            <div class="panel padder-v item">
                                                <div class="h3 font-thin h3"><span class="fa fa-laptop"></span></div>
                                                <span class="text-muted text-xs">行政入库</span>
                                                <div class="bottom text-left">

                                                </div>
                                            </div>
                                        </a>
                                    </div>

                                    <div class="col-xs-6 col-xm-4 col-md-3">
                                        <a href="{:url('index/clothes/index')}">
                                            <div class="panel padder-v item">
                                                <div class="h3 text-info font-thin h3"><span class="fa fa-bar-chart"></span></div>
                                                <span class="text-muted text-xs">成衣订单管理</span>
                                                <div class="top text-right w-full">
                                                </div>
                                            </div>
                                        </a>
                                    </div>
                                    <div class="col-xs-6 col-xm-4 col-md-3">
                                        <a href="{:url('index/clothes/addorder')}">
                                            <div class="panel padder-v item bg-primary">
                                                <div class="h3 text-fff font-thin h3">
                                                    <span class="fa fa-edit"></span></div>
                                                    <span class="text-muted text-xs">录入成衣订单</span>
                                                    <div class="top text-right w-full">
                                                    </div>
                                                </div>
                                            </a>
                                        </div>
                                        <div class="col-xs-6 col-xm-4 col-md-3">
                                            <a href="{:url('index/shop/addClothes')}">
                                                <div class="panel padder-v item bg-info">
                                                    <div class="h3 text-fff font-thin h3"><span class="fa fa-download"></span></div>
                                                    <span class="text-muted text-xs">店铺入库</span>
                                                    <div class="top text-right w-full">

                                                    </div>
                                                </div>
                                            </a>
                                        </div>
                                        <div class="col-xs-6 col-xm-4 col-md-3">
                                            <a href="{:url('index/shop/outbound')}">
                                                <div class="panel padder-v item yellow-bg">
                                                    <div class="h3 font-thin h3"><span class="fa fa-upload" style="color: #fff;"></span></div>
                                                    <span class="text-muted text-xs">成衣出库</span>
                                                    <div class="bottom text-left">

                                                    </div>
                                                </div>
                                            </a>
                                        </div>
                                    </div>

                           <!--  <div class="row row-sm text-center" id="kuai_box" style="display: none;">
                               <div class="col-xs-6 col-xm-4 col-md-3">
                                   <a href="{:url('index/order/index')}">
                                   <div class="panel padder-v item yellow-bg">
                                       <div class="h3 text-info font-thin h3"><span class="fa fa-bar-chart" style="color: #fff"></span></div>
                                       <span class="text-muted text-xs">订单的管理</span>
                                       <div class="top text-right w-full">
                                       </div>
                                   </div>
                                   </a>
                               </div>
                               <div class="col-xs-6 col-xm-4 col-md-3">
                                   <a href="{:url('index/order/create')}">
                                   <div class="panel padder-v item bg-info">
                                       <div class="h3 text-fff font-thin h3">
                                           <span class="fa fa-edit"></span></div>
                                       <span class="text-muted text-xs">录入订单</span>
                                       <div class="top text-right w-full">
                                       </div>
                                   </div>
                                   </a>
                               </div>
                               <div class="col-xs-6 col-xm-4 col-md-3">
                                   <a href="{:url('index/customer/index')}">
                                   <div class="panel padder-v item bg-primary">
                                       <div class="h3 text-fff font-thin h3"><span class="fa fa-file-text"></span></div>
                                       <span class="text-muted text-xs">客户管理</span>
                                       <div class="top text-right w-full">
                                           
                                       </div>
                                   </div>
                                   </a>
                               </div>
                               <div class="col-xs-6 col-xm-4 col-md-3">
                                   <a href="{:url('index/user/updateIndex',array('id'=>$user['id']))}">
                                   <div class="panel padder-v item">
                                       <div class="h3 font-thin h3"><span class="fa fa-user"></span></div>
                                       <span class="text-muted text-xs">个人中心</span>
                                       <div class="bottom text-left">
                                           
                                       </div>
                                   </div>
                                   </a>
                               </div>
                           
                               <div class="col-xs-6 col-xm-4 col-md-3">
                                   <a href="{:url('index/order/index')}">
                                   <div class="panel padder-v item">
                                       <div class="h3 text-info font-thin h3"><span class="fa fa-bar-chart"></span></div>
                                       <span class="text-muted text-xs">订单管理</span>
                                       <div class="top text-right w-full">
                                       </div>
                                   </div>
                                   </a>
                               </div>
                               <div class="col-xs-6 col-xm-4 col-md-3">
                                   <a href="{:url('index/order/create')}">
                                   <div class="panel padder-v item bg-primary">
                                       <div class="h3 text-fff font-thin h3">
                                           <span class="fa fa-edit"></span></div>
                                       <span class="text-muted text-xs">录入订单</span>
                                       <div class="top text-right w-full">
                                       </div>
                                   </div>
                                   </a>
                               </div>
                               <div class="col-xs-6 col-xm-4 col-md-3">
                                   <a href="{:url('index/customer/index')}">
                                   <div class="panel padder-v item bg-info">
                                       <div class="h3 text-fff font-thin h3"><span class="fa fa-file-text"></span></div>
                                       <span class="text-muted text-xs">客户管理</span>
                                       <div class="top text-right w-full">
                                           
                                       </div>
                                   </div>
                                   </a>
                               </div>
                               <div class="col-xs-6 col-xm-4 col-md-3">
                                   <a href="{:url('index/user/updateIndex',array('id'=>$user['id']))}">
                                   <div class="panel padder-v item yellow-bg">
                                       <div class="h3 font-thin h3"><span class="fa fa-user" style="color: #fff;"></span></div>
                                       <span class="text-muted text-xs">个人中心</span>
                                       <div class="bottom text-left">
                                           
                                       </div>
                                   </div>
                                   </a>
                               </div>
                           </div> -->

                       </div>
                   </div>
               </div>
           </div>
       </div>
       <div class="row_box">
        <form action="" method="get">
            <div class="check_box" class="col-sm-2" style="margin-bottom: 10px;">查询起止时间：
                <input placeholder="开始日期" class="form-control layer-date" id="workStart" style="max-width: 10% !important;margin-top: -5px !important;height: 26px;" name="kpiStime">
                <input placeholder="结束日期" class="form-control layer-date" id="workEnd" style="max-width: 10% !important;margin-top: -5px !important;height: 26px;" name="kpiEtime">
                <button type="submit" class="timeCheck">查询</button>
            </div>
        </form>        
        <table class="col-sm-12" cellpadding="0" cellspacing="0" border="0">
            <tr style="background:#fff !important;">
                <th colspan="21">网店KPI</th>
            </tr>
            <tr style="background:#fff !important;">
                <th colspan="2" >&nbsp;</th>
                <th colspan="7" >总客户</th>
                <th colspan="6" >复购KPI</th>
                <th colspan="6" >转介绍KPI</th>
            </tr>
            <tr style="background:#07f2dc !important;">
                <th>店铺</th>
                <th>负责人</th>
                <th>下单金额</th>
                <th>实收金额</th>
                <th>下单件数</th>
                <th>商品客户数</th>
                <th>件单价</th>
                <th>客单价</th>
                <th>连带率</th>
                <th>复购业绩</th>
                <th>复购件数</th>
                <th>复购商品客户数</th>
                <th>件单价</th>
                <th>客单价</th>
                <th>连带率</th>
                <th>自建新客业绩</th>
                <th>自建新客件数</th>
                <th>自建新客商品客户数</th>
                <th>件单价</th>
                <th>客单价</th>
                <th>连带率</th>
            </tr>
            {volist name="mendian" id="vo"}
            <tr>
                <td>{$vo.title}</td>
                <td>{$vo.truename}</td>
                <td>{$vo.price}</td>
                <td>{$vo.true_price}</td>
                <td>{$vo.num}</td>
                <td>{$vo.cust_num}</td>
                <td>{$vo.jian_price}</td>
                <td>{$vo.cust_price}</td>
                <td>{$vo.liandai}</td>
                <td>{$vo.fugou_price}</td>
                <td>{$vo.fugou_num}</td>
                <td>{$vo.fugou_cust}</td>
                <td>{$vo.fg_jian_price}</td>
                <td>{$vo.fg_cust_price}</td>
                <td>{$vo.fg_liandai}</td>
                <td>{$vo.ziji_price}</td>
                <td>{$vo.ziji_num}</td>
                <td>{$vo.ziji_cust}</td>
                <td>{$vo.zj_jian_price}</td>
                <td>{$vo.zj_cust_price}</td>
                <td>{$vo.zj_liandai}</td>
            </tr>
            {/volist}
			<tr id="zongji">
				<td colspan="2">总计</td>
				<td>{$allKPI.all_price}</td>
				<td>{$allKPI.all_true_price}</td>
				<td>{$allKPI.num}</td>
				<td>{$allKPI.all_cust}</td>
				<td>{$allKPI.all_jiandan}</td>
				<td>{$allKPI.all_kedan}</td>
				<td>{$allKPI.all_liandai}</td>
				<td>{$allKPI.fg_price}</td>
				<td>{$allKPI.fg_num}</td>
				<td>{$allKPI.fg_cust}</td>
				<td>{$allKPI.fg_jiandan}</td>
				<td>{$allKPI.fg_kedan}</td>
				<td>{$allKPI.fg_liandai}</td>
				<td>{$allKPI.new_price}</td>
				<td>{$allKPI.new_num}</td>
				<td>{$allKPI.new_cust}</td>
				<td>{$allKPI.new_jiandan}</td>
				<td>{$allKPI.new_kedan}</td>
				<td>{$allKPI.new_liandai}</td>
			</tr>
        </table>
    </div>
    <div><br><br><br></div>
    <div class="col-sm-12">
        <div style="height: 300px;margin-top: 68px;" class="col-sm-7">
            <div class="titles" >本月门店业绩达成率</div>
            <div id="container" style="height: 100%;width: 100%;"></div>
        </div>
        <div style="height: 300px;margin-top: 68px; float: right; margin-right: 2%" class="col-sm-4">
            <div class="titles" >本月门店业绩占比</div>
            <div id="benyueyeji" style="height: 100%"></div>
        </div>
    </div>
    <div style="height: 500px;margin-top: 68px;" class="col-sm-12">
        <div class="titles" >每日业绩情况</div>
        <div id="meiri" style="height: 100%"></div>
    </div>

    <div style="height: 500px;margin-top: 68px;" class="col-sm-12" id="jiuzheer">
        <form action="" method="get">
            <div class="check_box" class="col-sm-12" style="margin-bottom: 10px;text-align: center;">查询起止时间：
                <input placeholder="开始日期" class="form-control layer-date" id="workStart2" style="max-width: 10% !important;margin-top: -5px !important;height: 26px;" name="kpiStime">
                <input placeholder="结束日期" class="form-control layer-date" id="workEnd2" style="max-width: 10% !important;margin-top: -5px !important;height: 26px;" name="kpiEtime">
                <button type="button" class="timeCheck" onclick="ajaxForcha()">查询</button>
            </div>
        </form> 
        <div style="height: 300px;margin-top: 68px;" class="col-sm-4">
            <div class="titles" class="col-sm-4" >品类占比分析</div>
            <div id="axis1" style="height: 100%"></div>
        </div>
        <div style="height: 300px;margin-top: 68px;" class="col-sm-4">
            <div class="titles" class="col-sm-4" >消费者年龄占比分析</div>
            <div id="age" style="height: 100%"></div>
        </div>
        <div style="height: 300px;margin-top: 68px;" class="col-sm-4">
            <div class="titles" class="col-sm-4" >线上线下销售占比分析</div>
            <div id="online" style="height: 100%"></div>
        </div>
        <div style="height: 300px;margin-top: 68px;" class="col-sm-4">
            <div class="titles" class="col-sm-4" >消费金额单件占比分析</div>
            <div id="price" style="height: 100%"></div>
        </div>
        <div style="height: 300px;margin-top: 68px;" class="col-sm-4">
            <div class="titles" class="col-sm-4" > 工厂订单占比分析</div>
            <div id="gongchang" style="height: 100%"></div>
        </div>
    </div> 
</div>
{/block}
{block name="js"}
<script>
    //外部js调用

    laydate({
        elem: '#workStart',
        event: 'focus'
    });
    laydate({
        elem: '#workEnd',
        event: 'focus'
    });
    laydate({
        elem: '#workStart2',
        event: 'focus'
    });
    laydate({
        elem: '#workEnd2',
        event: 'focus'
    });

    //日期范围限制
    var start = {
        elem: '#start',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(), //设定最小日期为当前日期
        max: '2099-06-16 23:59:59', //最大日期
        istime: true,
        istoday: false,
        choose: function (datas) {
            end.min = datas; //开始日选好后，重置结束日的最小日期
            end.start = datas //将结束日的初始值设定为开始日
        }
    };
    var end = {
        elem: '#end',
        format: 'YYYY/MM/DD hh:mm:ss',
        min: laydate.now(),
        max: '2099-06-16 23:59:59',
        istime: true,
        istoday: false,
        choose: function (datas) {
            start.max = datas; //结束日选好后，重置开始日的最大日期
        }
    };
    laydate(start);
    laydate(end);
</script>
<script type="text/javascript">
    var pr = eval('{$getOrderPrice}');
    var czb = eval('{$categoryPercent}');
    var cmz = eval('{$categoryName}');
    var age = eval('{$getOrderAge}');
    var ol = eval('{$getOnlineNum}');
    var gc = eval('{$getOrderGongchang}');
    $(document).ready(function(){
        getOrderPrice();
        getOrderCategory();
        getOrderAge();
        getOrderOnline();
        getOrderGongchang();
            //代办事项
            $('.daiHeader .daiTitle').click(function(){
                var _index = $(this).index();
                $('.daiCont #dai_cont').eq(_index).fadeIn('slow');
                $('.daiCont #dai_cont').eq(_index).show().siblings().hide();
                $(this).addClass('onActive').siblings().removeClass('onActive');
            })

            //快捷方式
            $('.kuaiHeader .kuai_more li').click(function(){
                var index_ = $(this).index();
                $('.kuai_cont #kuai_box').eq(index_).fadeIn('slow');
                console.log($('.kuai_cont #kuai_box').eq(index_));
                $('.kuai_cont #kuai_box').eq(index_).show().siblings().hide();
                $(this).addClass('dActive').siblings().removeClass('dActive');
            })

    })
    /*点击按钮按照时间进行查询的方法*/
    function   ajaxForcha()
    {
        var stime = $('#workStart2').val();
        var etime = $('#workEnd2').val();
        $.post('/index/index/getDataForAjax', {stime: stime,etime:etime}, function(data) {
            pr  = eval(data['getOrderPrice']);
            czb = eval(data['categoryPercent']);
            cmz = eval(data['categoryName']);
            age = eval(data['getOrderAge']);
            ol  = eval(data['getOnlineNum']);
            gc  = eval(data['getOrderGongchang']);
            getOrderPrice();
            getOrderCategory();
            getOrderAge();
            getOrderOnline();
            getOrderGongchang();
        });
    }
    /*获取金额占比的方法*/
    function  getOrderPrice()
    {
        var dom = document.getElementById("price");
        var myChart = echarts.init(dom);
        var app = {};
        option = null;
        app.title = '环形图';
        option = {
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                x: 'left',
                data:['0.5K以下','0.5-1K','1-1.5K','1.5-2K','2-2.5K','2.5-3K','3K以上']
            },
            color : ['#F66BBF','#FF9F7F', '#FFF065', '#67E0E3', '#37A2DA','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
            series: [
                {
                    name:'金额占比',
                    type:'pie',
                    radius: ['50%', '70%'],
                    avoidLabelOverlap: false,
                    label: {
                        normal: {
                            show: false,
                            position: 'center'
                        },
                        emphasis: {
                            show: true,
                            textStyle: {
                                fontSize: '20',
                                fontWeight: 'bold'
                            }
                        }
                    },
                    labelLine: {
                        normal: {
                            show: false
                        }
                    },
                    data:pr
                }
            ]
        };
        if (option && typeof option === "object") {
            myChart.setOption(option, true);
        }
    }

    /*品类占比分析的方法*/
    function getOrderCategory()
    {
        var dom = document.getElementById("axis1");
        var myChart = echarts.init(dom);
        var app = {};
        option = null;
        
        app.title = '环形图';

        option = {
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                x: 'left',
                data: cmz
            },
            color : ['#F66BBF','#FF9F7F', '#FFF065', '#67E0E3', '#37A2DA','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
            series: [
            {
                name:'品类占比',
                type:'pie',
                radius: ['50%', '70%'],
                avoidLabelOverlap: false,
                label: {
                    normal: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontSize: '20',
                            fontWeight: 'bold'
                        }
                    }
                },
                labelLine: {
                    normal: {
                        show: false
                    }
                },
                data:czb
            }
            ]
        };
        ;
        if (option && typeof option === "object") {
            myChart.setOption(option, true);
        }
    }
    /*年龄段占比分析的方法*/
    function getOrderAge()
    {
        var dom = document.getElementById("age");
        var myChart = echarts.init(dom);
        var app = {};
        option = null;
        app.title = '环形图';
        option = {
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                x: 'left',
            //data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
            data: ['20岁以下','20-25岁','25-30岁','30-35岁','35-40岁','40-45岁','45-50岁','50岁以上']
            },
            color : ['#F66BBF','#FF9F7F', '#FFF065', '#67E0E3', '#37A2DA','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
            series: [
            {
                name:'年龄占比',
                type:'pie',
                radius: ['50%', '70%'],
                avoidLabelOverlap: false,
                label: {
                    normal: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontSize: '20',
                            fontWeight: 'bold'
                        }
                    }
                },
                labelLine: {
                    normal: {
                        show: false
                    }
                },
                data:age
            }
            ]
        };
        if (option && typeof option === "object") {
            myChart.setOption(option, true);
        }
    }

    /*工厂订单的占比分析方法*/
    function getOrderGongchang()
    {
        var dom = document.getElementById("gongchang");
        var myChart = echarts.init(dom);
        var app = {};
        option = null;
        app.title = '环形图';
        option = {
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                x: 'left',
            //data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
            data: ['翔宇丹工厂','红岭工厂','如意工厂','鲁泰工厂']
            },
            color : ['#F66BBF','#FF9F7F', '#FFF065', '#67E0E3', '#37A2DA','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
            series: [
            {
                name:'工厂订单占比',
                type:'pie',
                radius: ['50%', '70%'],
                avoidLabelOverlap: false,
                label: {
                    normal: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontSize: '20',
                            fontWeight: 'bold'
                        }
                    }
                },
                labelLine: {
                    normal: {
                        show: false
                    }
                },
                data:gc
            }
            ]
        };
        if (option && typeof option === "object") {
            myChart.setOption(option, true);
        }
    }
    /*线上线下占比分析的方法*/
    function getOrderOnline()
    {
        var dom = document.getElementById("online");
        var myChart = echarts.init(dom);
        var app = {};
        option = null;
        
        app.title = '环形图';
            option = {
                tooltip: {
                    trigger: 'item',
                    formatter: "{a} <br/>{b}: {c} ({d}%)"
                },
                legend: {
                    orient: 'vertical',
                    x: 'left',
                    data:['线上订单数','线下订单数']
                //data: md
            },
            color : ['#F66BBF','#FF9F7F', '#FFF065', '#67E0E3', '#37A2DA','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
            series: [
            {
                name:'线上线下销售占比',
                type:'pie',
                radius: ['50%', '70%'],
                avoidLabelOverlap: false,
                label: {
                    normal: {
                        show: false,
                        position: 'center'
                    },
                    emphasis: {
                        show: true,
                        textStyle: {
                            fontSize: '20',
                            fontWeight: 'bold'
                        }
                    }
                },
                labelLine: {
                    normal: {
                        show: false
                    }
                },
                data:ol
            }
            ]
        };
        if (option && typeof option === "object") {
            myChart.setOption(option, true);
        }
    }
</script>
    <script type="text/javascript">
        var dom = document.getElementById("container");
        var myChart = echarts.init(dom);
        var app = {};
        var yj = eval('{$shopPrice}');
        var shop = eval('{$shopName}');
        var zb = eval('{$shopYeji}');
        var db = eval('{$shopDabiao}');
        var ss = eval('{$shopTruePrice}');
        option = null;
        app.title = '折柱混合';

        option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                    crossStyle: {
                        color: '#999'
                    }
                }
            },
            toolbox: {
                feature: {
                    dataView: {show: true, readOnly: false},
                    magicType: {show: true, type: ['line', 'bar']},
                    restore: {show: true},
                    saveAsImage: {show: true}
                }
            },
            legend: {
                data:['业绩','实收','指标','业绩达成率']
            },
            color : ['#F66BBF','#FF9F7F', '#FFF065', '#67E0E3', '#37A2DA','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
            xAxis: [
            {
                type: 'category',
                data: shop ,
                axisPointer: {
                    type: 'shadow'
                }
            }
            ],
            yAxis: [
            {
                type: 'value',
                name: '业绩',
                axisLabel: {
                    formatter: '{value} ￥'
                }
            },
            {
                type: 'value',
                name: '业绩达成率',
                axisLabel: {
                    formatter: '{value} °%'
                }
            }
            ],
            series: [
            {
                name:'业绩',
                type:'bar',
                data: yj
            },
            {
                name:'实收',
                type:'bar',
                data: ss
            },
            {
                name:'指标',
                type:'bar',
                data: zb
            },
            {
                name:'业绩达成率',
                type:'line',
                yAxisIndex: 1,
                data: db
            }
            ]
        };
        ;
        if (option && typeof option === "object") {
            myChart.setOption(option, true);
        }
    </script>
    <script type="text/javascript">
        var dom = document.getElementById("meiri");
        var myChart = echarts.init(dom);
        var app = {};
        var date = eval('{$date}');
        var jk   = eval('{$shopOne}');
        var ls   = eval('{$shopTwo}');
        var pa   = eval('{$shopFive}');
        var jkAvg = eval('{$shopAvgOne}');
        var lsAvg = eval('{$shopAvgTwo}');
        var paAvg = eval('{$shopAvgFive}');
        option = null;
        app.title = '折柱混合';

        option = {
            tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                    crossStyle: {
                        color: '#9d6dff'
                    }
                }
            },
            toolbox: {
                feature: {
                    dataView: {show: true, readOnly: false},
                    magicType: {show: true, type: ['line', 'bar']},
                    restore: {show: true},
                    saveAsImage: {show: true}
                }
            },
            legend: {
                data:['西大街店','龙首店','磐安店','西大街店日均指标','龙首店日均指标','磐安店日均指标']
            },
           color : ['#F66BBF','#FF9F7F', '#FFF065', '#67E0E3', '#37A2DA','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
            xAxis: [
            {
                type: 'category',
                data: date,
                axisPointer: {
                    type: 'shadow'
                }
            }
            ],
            yAxis: [
            {
                type: 'value',
                name: '金额',
                
                axisLabel: {
                    formatter: '{value} ￥'
                }
            },
            ],
            series: [
            {
                name:'西大街店',
                type:'bar',
                data: jk
            },
            {
                name:'龙首店',
                type:'bar',
                data: ls
            },
            {
                name:'磐安店',
                type:'bar',
                data:pa
            },
            {
                name:'西大街店日均指标',
                type:'line',
            smooth:false,   //关键点，为true是不支持虚线的，实线就用true
            itemStyle:{
                normal:{
                    lineStyle:{
                        width:2,
                        type:'dotted'  //'dotted'虚线 'solid'实线
                    }
                }
            },            
            data: jkAvg

        },
        {
            name:'龙首店日均指标',
            type:'line',
            smooth:false,   //关键点，为true是不支持虚线的，实线就用true
            itemStyle:{
                normal:{
                    lineStyle:{
                        width:2,
                        type:'dotted'  //'dotted'虚线 'solid'实线
                    }
                }
            },            
            data:lsAvg
        },
        {
            name:'磐安店日均指标',
            type:'line',
            smooth:false,   //关键点，为true是不支持虚线的，实线就用true
            itemStyle:{
                normal:{
                    lineStyle:{
                        width:2,
                        type:'dotted'  //'dotted'虚线 'solid'实线
                    }
                }
            },            
            data:paAvg
        }
        ]
    };
    ;
    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }
</script>
<script type="text/javascript">
    
</script>
<script type="text/javascript">
    var dom = document.getElementById("benyueyeji");
    var myChart = echarts.init(dom);
    var app = {};
    option = null;
    var yj = eval('{$benyue}');
    var md = eval('{$dianpu}');
    app.title = '环形图';

    option = {
        tooltip: {
            trigger: 'item',
            formatter: "{a} <br/>{b}: {c} ({d}%)"
        },
        legend: {
            orient: 'vertical',
            x: 'left',
        //data:['直接访问','邮件营销','联盟广告','视频广告','搜索引擎']
        data: md
    },
    color : ['#F66BBF','#FF9F7F', '#FFF065', '#67E0E3', '#37A2DA','#749f83',  '#ca8622', '#bda29a','#6e7074', '#546570', '#c4ccd3'],
    series: [
    {
        name:'业绩占比',
        type:'pie',
        radius: ['50%', '70%'],
        avoidLabelOverlap: false,
        label: {
            normal: {
                show: false,
                position: 'center'
            },
            emphasis: {
                show: true,
                textStyle: {
                    fontSize: '20',
                    fontWeight: 'bold'
                }
            }
        },
        labelLine: {
            normal: {
                show: false
            }
        },
        data:yj
    }
    ]
};
;
if (option && typeof option === "object") {
    myChart.setOption(option, true);
}
</script>

<!-- Flot -->
<script src="__INDEX__/js/plugins/flot/jquery.flot.js"></script>
<script src="__INDEX__/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
<script src="__INDEX__/js/plugins/flot/jquery.flot.resize.js"></script>
<script src="__INDEX__/js/plugins/flot/jquery.flot.pie.js"></script>
<!-- 自定义js -->
<script src="__INDEX__/js/content.js"></script>
<!--flotdemo-->
{/block}